/*
 * Copyright (c) 2014 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

:host { display: block; }

h2 {
    -webkit-user-select: none;
    cursor: default;
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}

.commit-status {
    margin: 0.5em 16px;
}

.issue-description {
    margin: 1em 16px;
}

.issue-content {
    flex: 1;
    -webkit-flex: 1;
}

.issue-body {
    display: -webkit-flex;
    display: flex;
}

.issue-toolbar {
    border-bottom: 1px #e5e5e5 solid;
}

cr-issue-patchsets,
cr-issue-messages {
    padding: 0.5em 16px;
}

cr-issue-meta {
    flex-shrink: 0;
    -webkit-flex-shrink: 0;
    width: 300px;
    padding: 0.5em 16px;
}

header {
    align-items: center;
    -webkit-align-items: center;
    display: -webkit-flex;
    display: flex;
}

header .ui-actions {
    padding: 0 16px;
    flex-shrink: 0;
    -webkit-flex-shrink: 0;
}

header h2 {
    flex: 1;
    -webkit-flex: 1;
}

.issue-toolbar .ui-actions {
    flex: 1;
    -webkit-flex: 1;
    display: -webkit-flex;
    display: flex;
    justify-content: flex-end;
    -webkit-justify-content: flex-end;
    align-items: center;
    -webkit-align-items: center;
}

@media (max-width: 600px) {
    .issue-body {
        flex-direction: column;
        -webkit-flex-direction: column;

    }

    .issue-toolbar .ui-actions,
    .issue-toolbar button {
        flex: none;
        -webkit-flex: none;
        margin: 8px;
        width: calc(50% - 16px);
        box-sizing: border-box;
    }

    .issue-toolbar a {
        margin: 8px;
        flex: 1;
        -webkit-flex: 1;
        text-align: center;
    }

    cr-issue-meta {
        padding: 0;
        order: 1;
        -webkit-order: 1;
    }

    cr-issue-patchsets,
    cr-issue-messages,
    header .ui-actions {
        padding: 0 8px;
    }

    .issue-description {
        margin: 1em 8px;
    }
}

:host-context(.no-login) .issue-toolbar {
    display: none;
}

:host-context(.no-login) .issue-content {
    margin-top: 1em;
}

.spinner {
    vertical-align: middle;
    margin: 0 8px;
}
